package org.pms.demo.webservice.dao.pms;

import org.apache.ibatis.annotations.Param;
import org.pms.demo.webservice.domain.Role;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by laijianpeng on 17/10/18.
 */
@Component
public interface RoleMapper {
    /**
     * 获取角色的总数
     * @return
     */
    public int getRoleListNum();

    /**
     * 分页获取角色列表
     * @param page
     * @param page_size
     * @return
     */
    public List<Role> getRoleListByPage(@Param("page")int page,@Param("page_size")int page_size);

    /**
     * 根据id获取权限
     * @param id
     * @return
     */
    public Role getRoleById(@Param("id")Long id);

    /**
     * 修改权限
     * @param role
     * @return
     */
    public int updateRoleById(Role role);
}
